
export const getFashionAndQuality = (vm) => {
  vm.$axios.get('/commodity/getyByFashionAndQuality')
    .then((res) => {
      let fashion = [];
      let quality = [];
      res.data.data.forEach((item) => {
        if (item.fashion === '1')
          fashion.push(item);
        else quality.push(item)
      })
      vm.fashion = fashion;
      vm.quality = quality;
    })
}

export const getNewestCommodity = (vm) => {
  vm.$axios.get('/commodity/getLated')
    .then((res) => {
      vm.newest = res.data.data;
    })
}

